<template>
  <div>
    <div>axios的使用</div>
  </div>
</template>
<script setup>
import axios from "axios";
axios
  .get("http://study.zmyfrank.com/menuList", {
    params: { id: 1 },
    timeout: 1000,
  })
  .then((result) => console.log(result));
axios
  .post(
    "http://study.zmyfrank.com/createMenu",
    { id: 1 },
    { params: { name: "zmy" }, timeout: 1000 }
  )
  .then((result) => console.log(result.data.data));
</script>
<style></style>
